package com.itheima.web;

import com.itheima.R;
import com.itheima.pojo.UmsMemberLevel;
import com.itheima.service.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/memberLevel")
public class UmsMemberLevelController {

    @Autowired
    private UmsMemberLevelService memberLevelService;

    /**
     * 查询会员等级
     * @param defaultStatus
     * @return
     */
    @GetMapping("/list")
    public R list(Integer defaultStatus) {
        List<UmsMemberLevel> list = memberLevelService.list(defaultStatus);
        return R.success(list);
    }

}